<?php

Yii::app()->setTimeZone(APP_TIMEZONE);
Yii::setPathOfAlias('lib', LIBRARIES_FOLDER);
Yii::setPathOfAlias('models', MODELS_FOLDER);
Yii::setPathOfAlias('frontend', FRONTEND);
Yii::setPathOfAlias('backend', BACKEND);

// uncomment the following to define a path alias
// Yii::setPathOfAlias('local','path/to/local-folder');
// This is the main Web application configuration. Any writable
// CWebApplication properties can be configured here.
return array(
    'id' => SITE_NAME,
    'name' => SITE_NAME,
    'preload' => array('log'),
    'import' => array(
        'application.models.*',
        'application.components.*',
        'lib.components.*',
        'lib.components.user.*',
        'lib.extensions.*',
        'lib.messages.*',
        'lib.messages.en.*',
        'lib.widgets.*',
        'models.*',
    ),
    'components' => array(
        'user' => array(
            'class' => 'lib.components.user.LGUser',
            'superAdmin' => 'admin',
            'allowAutoLogin' => true,
            'identityCookie' => 'cms_cookie_lotus_ocean',
            'authTimeout' => 7200,
            'loginUrl' => ADMINISTRATOR_URL . '/authorization/login',
            'stateKeyPrefix' => 'cms_system_user_lotus_ocean',
        ),
        'db' => array(
            'class' => 'CDbConnection',
            
            /*For development*/
            'connectionString' => 'mysql:host=localhost;dbname=lotusocean;',            
            'username' => 'root',
            'password' => '',
            
            /*For live server*/
            //'connectionString' => 'mysql:host=localhost;dbname=lotusocean;',            
            //'username' => 'lotus',
            //'password' => '@123456',
            
            'emulatePrepare' => true,
            'charset' => 'utf8',
            'tablePrefix' => 'cms_',
            
            
        ),
        'email' => array(
            'class' => 'KEmail',
            
            /*For development*/
            'host_name' => 'smtp.gmail.com',            
            'user' => 'wtest135@gmail.com',
            'password' => '@WT13579',
            'host_port' => '465',
            'debug' => false,
            
            //For live server
            /*'host_name' => 'smtp.gmail.com',            
            'user' => 'wtest135@gmail.com',
            'password' => '@WT13579',
            'host_port' => '465',
            'debug' => false,*/
        ),
        'authManager' => array(
            'class' => 'lib.components.RDbAuthManager',
            'defaultRoles' => array('Guest', 'Authenticated'),
            'connectionID' => 'db',
        ),
        'log' => array(
            'class' => 'CLogRouter',
            'routes' => array(
                array(
                    'class' => 'CFileLogRoute',
                    'levels' => 'error, warning',
                ),
            ),
        ),
    ),
    'params' => array(
        'debugMode' => false,
        'email' => array(
            'sender' => 'no-reply@lotus-ocean.com',
            'name' => 'Lotus Ocean',
            'subject' => 'Chao mung den voi cong ty Sen Dai Duong',
            'admin' => array('wtest135@gmail.com'),
        ),
        'emailTesting' => array('wtest135@gmail.com'),        
        'version' => '1.0 (build 1.0)',
    ),
);